{include file="header.tpl" title="Logg inn" logged_in=$logged_in CONFIG=$CONFIG}

{if !$logged_in}
<br>
Har du ikke bruker? Registrer en
    <a href="{$smarty.server.php_self}?view=register">ny bruker</a>.
<br><br>
	{if $failed_login}
		{include file="message.tpl" type="warn" message="<strong>Innlogging mislykket</strong>
                    <br><br>Enten passord eller brukernavn som var gitt er feil."}
	{/if}
<br><br>
<form action="session.php" name="login" method="POST">
  <table
 style="width: 60%; text-align: left; margin-left: auto; margin-right: auto;"
 border="0" cellpadding="0" cellspacing="0">
    <tbody>
      <tr class="row_green">
        <th colspan="2" rowspan="1" style="width: 90%;">Logg
inn</th>
      </tr>
      <tr class="row_green_cycle">
        <td>
Brukernavn<br>
        </td>
        <td  ><input
 name="user"></td>
      </tr>
      <tr class="row_green_cycle">
        <td  >Passord</td>
        <td  ><input
 name="password" type="password"></td>
      </tr>
      <tr class="row_green_cycle">
        <td  ></td>
        <td  ><input
 name="remember" type="checkbox">Husk innlogging</td>
      </tr>
      <tr>
        <td></td>
        <td style="text-align: left;" >
        <input type="hidden" name="action" value="login" />
        <input
 value="Logg inn" type="submit"></td>
      </tr>
    </tbody>
  </table>
</form>
<br>
{else}
{assign var=user value=$smarty.session.user}
    <p>Du er logget inn som {$user}. <a href="session.php?action=logout">Logge ut?</a></p>

{/if}

{include file="footer.tpl"}
